<template>
	<view class="ys">
		<view class="detail">
			<view class="title">
				{{info.title}}
			</view>
			<view class="time">
				{{info.create_time}}
			</view>
			<view class="content" v-html="info.content">

			</view>
		</view>
	</view>
</template>

<script>
	import { noticeDetail } from "@/api/api.js"
	export default {
		data() {
			return {
				id: '',
				info: {}
			}
		},
		onLoad(e) {
			if (e.id) {
				this.id = e.id
				this.getDetail()
			}
		},
		methods: {
			getDetail() {
				noticeDetail({id:this.id}).then(res=>{
					if(res.code == 0){
						this.info = res.data
					}else{
						uni.$showMsg(res.msg)
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		background: #f3f5f8;
		box-sizing: border-box;
		padding: 10px 0;
		box-sizing: border-box;
	}

	.detail {
		background: #fff;
		border-radius: 8px;
		width: 96%;
		margin: 0 auto;
		padding: 10px;
		box-sizing: border-box;

		.title {
			font-weight: bold;
			font-size: 17px;
			text-align: center;
			padding: 10px 0;
		}

		.time {
			color: #777;
			text-align: center;
			font-size: 14px;
		}

		.content {
			margin-top: 10px;
		}
	}
</style>